<?php
namespace Index\ViewModel;
use Think\Model\ViewModel;
Class ReportViewModel extends ViewModel {
    protected $connection = 'DB';   //连接数据库
    protected $viewFields = array(
        //用户表
        'chat_userinfo'=>['user_sex','user_uid','user_id','user_name','user_phone','user_logo','_type' => 'left'],
        //举报详情表
        'chat_complaint'=>['id','complaint_type_name','complaint_user_id','complaint_logo','complaint_nickname','complaint_sex','complaint_phone','pic','ctime', '_on'=>'chat_userinfo.user_uid=chat_complaint.user_uid'],
    );
}

